#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QStringListModel>
#include <QTableView>
#include "stock/stock.h"
#include "parser/parser.h"
#include "stock/view.h"
#include <QDebug>
#include <QStringList>
#include "db/db.h"
#include <QLabel>
#include "config/config.h"
#include "global/global.h"
#include "stock/newstockdialog.h"
#include "depot/newdepotdialog.h"
#include "depot/depothandler.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

public slots:
    void connectionChanged(int state);

private slots:
    void on_actionChart_triggered();
    void viewDoubleClicked(QModelIndex index);

private:
    Ui::MainWindow *ui;
    Stock* s;
    DepotHandler* d;
    QLabel* statusLabel;
    Config* cfg;
    DB* db;

    //dialogs:
    NewStockDialog* stockDialog;
    NewDepotDialog* depotDialog;
};

#endif // MAINWINDOW_H
